'''
Created on Mar 15, 2011

@author: brendenjeon
'''

from base.models import School, ClassProperty, OneClass

s = School.all()[0].key()

query = db.GqlQuery("SELECT * FROM OneClass WHERE ANCESTOR IS :parent order by date", parent=s)

d = query.fetch(10)
print len(d)

# time Schedule
from datetime import datetime
d = datetime(2011, 1, 8)
OneClass.gql('WHERE date=:1', d)